<template>
  <div class="massage">
    <van-nav-bar
      title="修改个人信息"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    />
    <div class="input">
      <van-uploader :after-read="afterRead" />
    </div>
    <div class="img">
      <img :src="imgUrl" v-if="imgUrl" alt="" />
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      imgUrl: "",
    };
  },
  created() {},
  computed: {},
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },

    afterRead(file) {
      console.log(file);
      this.imgUrl = file.content;
    },
  },
};
</script>
<style>
.input {
  margin: 20px 0px 0 132px;
}
.img img {
  width: 100px;
  height: 100px;
}
</style>
